﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Qreed.Windows
{
    public class ScopeTextBoxEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ScopeTextBoxEventArgs"/> class.
        /// </summary>
        /// <param name="scope">The scope.</param>
        internal ScopeTextBoxEventArgs(TextScope scope)
        {
            Scope = scope;
        }

        private TextScope _scope;
        /// <summary>
        /// Gets or sets the scope.
        /// </summary>
        /// <value>The scope.</value>
        internal TextScope Scope
        {
            get { return this._scope; }
            set { this._scope = value; }
        }
	
        /// <summary>
        /// Gets the value of the scope.
        /// </summary>
        /// <value>The value.</value>
        public string Value
        {
            get { return this.Scope.Text; }
        }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name
        {
            get { return Scope.Name; }
            set { Scope.Name = value; }
        }

        private bool _cancel;
        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="ScopeTextBoxEventArgs"/> is canceled.
        /// </summary>
        /// <value><c>true</c> if canceled; otherwise, <c>false</c>.</value>
        public bool Cancel
        {
            get { return this._cancel; }
            set { this._cancel = value; }
        }
    }
}
